﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Web.App_Code;
using QXBook.Service;
using QXBook.Utils;

namespace Web.SysManage
{
    public partial class Logout : AdminBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    ServiceFactory.CreateInstance<AdminService>().Logout();
                    CachingService.Remove(CachingService.CACHING_ALL_ADMIN_ENTITY);
                }
                catch (Exception ex)
                {
                    base.AjaxErch("{state:false}");
                    return;
                }

                base.AjaxErch("{state:true}");
            }
        }
    }
}